import request from '@/utils/request'

// 查询物料库存列表
export function listInventory(query) {
  return request({
    url: '/mwm/inventory/list',
    method: 'get',
    params: query
  })
}

// 查询物料库存详细
export function getInventory(inventoryId) {
  return request({
    url: '/mwm/inventory/' + inventoryId,
    method: 'get'
  })
}

// 新增物料库存
export function addInventory(data) {
  return request({
    url: '/mwm/inventory',
    method: 'post',
    data: data
  })
}

// 修改物料库存
export function updateInventory(data) {
  return request({
    url: '/mwm/inventory',
    method: 'put',
    data: data
  })
}

// 删除物料库存
export function delInventory(inventoryId) {
  return request({
    url: '/mwm/inventory/' + inventoryId,
    method: 'delete'
  })
}
// 查询物料不分页列表
export function listMaterial(query) {
  return request({
    url: '/mwm/inventory/material/getlist',
    method: 'get',
    params: query
  })
}

// 查询仓库不分页列表
export function listWarehouse(query) {
  return request({
    url: '/mwm/inventory/warehouse/getlist',
    method: 'get',
    params: query
  })
} 

// 查询库位不分页列表
export function listLocation(query) {
  return request({
    url: '/mwm/inventory/location/getlist',
    method: 'get',  
    params: query
  })
}


